stack: Don't transition when the visible child is remove
authorMatthias Clasen <mclasen@redhat.com>
Sun, 25 Oct 2020 00:54:55 +0000 (20:54 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 25 Oct 2020 00:54:55 +0000 (20:54 -0400)
This is a corner-case, and it is causing crashes in
the shortcuts window, after a11ab6c995a38fde0eba.

gtk/gtkstack.c

index e1a24b77634313bdfc2d8800e2992800294527a6..b06bc3629d5cfb523ac1da8a03a6445a3e8ae2b6 100644 (file)
@@ -1474,12 +1474,7 @@ stack_remove (GtkStack  *stack,
   was_visible = gtk_widget_get_visible (child);
 
   if (priv->visible_child == child_info)
-    {
-      if (in_dispose)
-        priv->visible_child = NULL;
-      else
-        set_visible_child (stack, NULL, priv->transition_type, priv->transition_duration);
-    }
+    priv->visible_child = NULL;
 
   if (priv->last_visible_child == child_info)
     priv->last_visible_child = NULL;